﻿namespace VehicleRental.API.Models
{
    using System.Runtime.Serialization;

    [DataContract]
    public class UserModel
    {
        [DataMember(Name="username")]
        public string Username { get; set; }

        [DataMember(Name = "authCode")]
        public string AuthCode { get; set; }

        [DataMember(Name = "email")]
        public string Email { get; set; }

        public static UserModel Parse(UserRegisterModel inputModel)
        {
            return new UserModel()
            {
                AuthCode = inputModel.AuthCode,
                Email = inputModel.Email,
                Username = inputModel.Username
            };
        }
    }
}